#!/usr/bin/env perl
($VERSION) = @ARGV or die "Usage: $0 version";
use dTemplate;
use Class::Date qw(now);
$mainpage = define dTemplate "index.htm";
open CHANGELOG, "Changes" or die "Cannot open Changes";
$/ = undef;
$CHANGELOG = <CHANGELOG>;
open TARGET, ">index.html" or die "Cannot open index.html for writing";
print TARGET $mainpage->parse(
        date		=> now,
        version		=> $VERSION,
        CHANGELOG	=> $CHANGELOG,
);
close TARGET;
